<template>
	<view>
		<view class="gzh-div" v-if="bottomShow">
			<u-icon class="close-icon" name="close-circle" color="#333" size="38" @click="bottomShowclose"></u-icon>
			<official-account @load="bindload" @error="binderror"></official-account>
		</view>
		<!-- <view class="gzh-div flex flex_sb" v-if="bottomShow">
			<view class="flex">
				<u-icon name="close" color="#fff" size="28" @click="bottomShow=false"></u-icon>
				<view class="font_14_FFF font_weight u-m-l-24">
				{{userType==1?'点击关注公众号，及时获取问题进度':'点击关注公众号，重要信息及时掌握'}}	
				</view>
			</view>
			<view class="gz-btn">去关注</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		name:"gongzhonghaotanchuang",
		data() {
			return {
				bottomShow:false,
				userType:1
			};
		},
		created() {
			if(!uni.getStorageSync("gongzhonghaotanchuangShow")){
				this.bottomShow = true
			}
			this.userType = uni.getStorageSync("userType")
		},
		
		methods: {
			bottomShowclose(){
				this.bottomShow = false
				uni.setStorage({
					key: 'gongzhonghaotanchuangShow',
					data: 1
				});
			},
		    bindload (e) {
		      console.log('bindload:', e)
		    },
		    binderror (e) {
				this.bottomShow = false
		      console.log('binderror:', e)
		    }
		}
	}
</script>

<style scoped lang="scss">
.gzh-div {
	width: 750rpx;
	height: auto;
	// background: rgba(0, 0, 0, 0.6);
	position: fixed;
	bottom: 160rpx;
	z-index: 2;
	// padding: 0 32rpx;
	
	.close-icon{
		position: absolute;
		right: 30rpx;
		top: 10rpx;
		z-index: 100;
	}

	.gz-btn {
		font-weight: bold;
		text-align: center;
		line-height: 56rpx;
		font-size: 24rpx;
		color: #ffffff;
		width: 128rpx;
		height: 56rpx;
		background: linear-gradient(180deg, #fa2d2d 0%, #f40000 100%);
		border-radius: 32rpx 32rpx 32rpx 32rpx;
	}
}
</style>